﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Security.Cryptography;
using MMS.Model;
using MMS.BLL;

namespace MarketMS
{
    public partial class FormLogin : CCWin.CCSkinMain
    {
        public FormLogin()
        {
            InitializeComponent();
        }

        private void skinTextBox1_Paint(object sender, PaintEventArgs e)
        {

        }


        private AdminManager am = new AdminManager();
        private void btnLogin_Click(object sender, EventArgs e)
        {
            string name = txtName.Text;
            string pass = txtPass.Text;


            AdminInfo admin = am.UserLogin(name, pass);//登录
            if (admin == null)
            {
                MessageBox.Show("登录失败,用户名或者密码错误");
            }
            else
            {
                this.Close();
            }
        }

        private void FormLogin_FormClosed(object sender, FormClosedEventArgs e)
        {
        }
    }
}
